home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / ply15dat.zip / ROMAN.PI < prev    next >
Text File  |  1992-10-07  |  4KB  |  163 lines

  1. // Adapted from: Persistence Of Vision raytracer version 1.0 sample file.
  2. // By Rick Mallett of Carleton University,  Ottowa.
  3. // First stage of the Tower of Pisa 
  4. // Warning:  This picture can take a very long time to ray trace
  5. // due to the large number of objects.  You have been warned :->  
  6. viewpoint {
  7.    from <0, 25, -150>
  8.    at   <0, 40, 0>
  9.    up <0, 1, 0>
  10.    angle 45
  11.    resolution 320, 240
  12.    aspect 4/3
  13.    }
  14.  
  15. // Add a light source
  16. light <60, 100, -110>
  17.  
  18. define position_objectx     1
  19. define position_worldx      2
  20. define lookup_sawtooth 1
  21. define ripple_normal 2
  22.  
  23. define red_marble
  24. texture {
  25.    noise surface {
  26.       color white
  27.       position_fn position_worldx
  28.       lookup_fn lookup_sawtooth
  29.       octaves 3
  30.       turbulence 3
  31.       ambient 0.3
  32.       diffuse 0.8
  33.       specular 0.3
  34.       microfacet Reitz 5
  35.       color_map(
  36.          [0.0, 0.8, <0.8, 0.8, 0.6>, <0.8, 0.4, 0.4>]
  37.          [0.8, 1.0, <0.8, 0.4, 0.4>, <0.8, 0.2, 0.2>])
  38.       }
  39.    }
  40.  
  41. define ground_ripple
  42. texture {
  43.    noise surface {
  44.       color <1, 0.66, 0.2>
  45.       normal ripple_normal
  46.       frequency 100
  47.       bump_scale 2
  48.       ambient 0.3
  49.       diffuse 0.7
  50.       }
  51.    }
  52.  
  53. define cloudy_sky
  54. texture {
  55.    noise surface {
  56.       ambient 0.9
  57.       diffuse 0
  58.       specular 0
  59.       turbulence 6.0
  60.       position_fn 0
  61.       lookup_fn lookup_sawtooth
  62.       octaves 4
  63.       color_map(
  64.          [0.0, 0.6, <0.4, 0.4, 0.4>, <1, 1, 1>]
  65.          [0.6, 0.8, <1, 1, 1>, <0.196078, 0.6, 0.8>]
  66.          [0.8, 1.0, <0.196078, 0.6, 0.8>, <0.196078, 0.6, 0.8>])
  67.       }
  68.    }
  69.  
  70. define beam
  71. object { cylinder <2, 0, 0>, <2, 40, 0>, 0.5 }
  72.  
  73. // create a sample column for the base of the structure
  74. define BaseColumn
  75. object {
  76.      beam
  77.    + beam { rotate <0,  25.7, 0> }
  78.    + beam { rotate <0,  51.4, 0> }
  79.    + beam { rotate <0,  77.1, 0> }
  80.    + beam { rotate <0, 102.8, 0> }
  81.    + beam { rotate <0, 128.5, 0> }
  82.    + beam { rotate <0, 154.2, 0> }
  83.    + beam { rotate <0, 179.9, 0> }
  84.    + beam { rotate <0, 205.6, 0> }
  85.    + beam { rotate <0, 231.3, 0> }
  86.    + beam { rotate <0, 257.0, 0> }
  87.    + beam { rotate <0, 282.7, 0> }
  88.    + beam { rotate <0, 308.4, 0> }
  89.    + beam { rotate <0, 334.1, 0> }
  90.    red_marble
  91.    }
  92.  
  93. // a rectangular pad to serve as a footing for the column
  94. define BasePad
  95. object {
  96.    box <-4, -1, -4>, <4, 1, 4>
  97.    red_marble { scale <10, 10, 10> }
  98.    }
  99.  
  100. // a basic arch to span the columns
  101. define BaseArch
  102. object {
  103.    (  object { cylinder <-2, 0, 0>, <2, 0, 0>, 12.5 }
  104.     + object { cylinder <-2, 0, 0>, <2, 0, 0>, 8.5 }
  105.     + object { disc <-2, 0, 0>, <-1, 0, 0>, 8.5, 12.5 }
  106.     + object { disc < 2, 0, 0>, < 1, 0, 0>, 8.5, 12.5 })
  107.    & object { disc <0, 0, 0>, <0,-1, 0>, 13 }
  108.    red_marble { scale <10, 10, 10> }
  109.    }
  110.  
  111. // and finally define the first floor floor
  112. define BaseFloor
  113. object {
  114.      object { cylinder <0, -2, 0>, <0, 2, 0>, 40 }
  115.    + object { cylinder <0, -2, 0>, <0, 2, 0>, 50 }
  116.    + object { disc <0, -2, 0>, <0, -1, 0>, 40, 50 }
  117.    + object { disc <0,  2, 0>, <0,  1, 0>, 40, 50 }
  118.    red_marble { scale <10, 10, 10> }
  119.    }
  120.  
  121. // place a ring of 14 columns with footings around the base
  122. define FullColumn
  123. object {
  124.      BaseColumn { translate <45, 0, 0> }
  125.    + BasePad { translate <45, -1, 0> }
  126.    + BasePad { translate <45, 41, 0> }
  127.    + BaseArch { translate <45, 41, 0> rotate <0, -12.85, 0> }
  128.    }
  129.  
  130. define Level1
  131. object {
  132.      FullColumn
  133.    + FullColumn { rotate <0,  25.7, 0> }
  134.    + FullColumn { rotate <0,  51.4, 0> }
  135.    + FullColumn { rotate <0,  77.1, 0> }
  136.    + FullColumn { rotate <0, 102.8, 0> }
  137.    + FullColumn { rotate <0, 128.5, 0> }
  138.    + FullColumn { rotate <0, 154.2, 0> }
  139.    + FullColumn { rotate <0, 179.9, 0> }
  140.    + FullColumn { rotate <0, 205.6, 0> }
  141.    + FullColumn { rotate <0, 231.3, 0> }
  142.    + FullColumn { rotate <0, 257.0, 0> }
  143.    + FullColumn { rotate <0, 282.7, 0> }
  144.    + FullColumn { rotate <0, 308.4, 0> }
  145.    + FullColumn { rotate <0, 334.1, 0> }
  146.    + BaseFloor { translate <0, 56.5, 0> }
  147.    }
  148.  
  149. Level1
  150.  
  151. // Add the sky to the picture
  152. object {
  153.    sphere <0, 0, 0>, 1000
  154.    scale <1, 0.2, 1>
  155.    cloudy_sky { scale <100, 100, 100> }
  156.    }
  157.  
  158. // Define the desert floor
  159. object {
  160.    disc <0, 0, 0>, <0, 1, 0>, 1001
  161.    ground_ripple { scale <500, 500, 500> }
  162.    }
  163.